#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int Add(int num1, int num2) {
    int sum = 0;
    int temp1 = 0;
    int temp2 = 0;
    do
    {
        temp1 = (num1 & num2) << 1;
        temp2 = num1 ^ num2;
        num1 = temp1;
        num2 = temp2;

    } while (temp1 & temp2);
    sum = num1 | num2;
    return sum;
}
int main()
{
    int n1 = 0, n2 = 0;
    scanf("%d %d", &n1, &n2);
    printf("%d", Add(n1, n2));
    return 0;
}